package decorator;

/**
 * @program: DesignModeProject
 * @description:
 * @author: Li canzhang
 * @create: 2022-05-22 19:24
 **/
public class Client {
    public static void main(String[] args) {
        //点一份longBlack
        Drink longBlack = new LongBlack();
        System.out.println(longBlack.cost() + longBlack.getDes());

        //2.再加一份牛奶
        Decorator milk = new Milk(longBlack);
        System.out.println(milk.cost() + "" + milk.getDes());

        //3.再加一份巧克力
        Decorator chocolate1 = new Chocolate(milk);
        System.out.println(chocolate1.cost() + "" + chocolate1.getDes());

        Decorator chocolate2 = new Chocolate(chocolate1);
        System.out.println(chocolate2.cost() + "" + chocolate2.getDes());
    }
}
